home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-10-26 | 7.2 KB | 140 lines | [TEXT/R*ch] |
- Sent: 10/24 (edited by dgp to incorporate subsequent additions)
- From: Fernando Urbina, nano@apple.com
- To: Denis Pelli, denis@cns.nyu.edu
- Enclosure: 7500/8500 Graphics Driver
-
- Denis,
-
- I'm enclosing a file that contains a revised version of the Graphics Driver for
- the Power Macintosh 7500 and 8500. Its version is 1.3f1. This has the following
- new resolutions:
-
- 1. For the Apple Multiscan 17" and 20", a new resolution of 640x480 at 120 Hz is
- available through the Sounds & Displays Control Panel. It will not show up on the
- Control Strip.
-
- 2. For the Multiscan 17" and 20", different refresh rates are available to be
- used while filming the display. Those rates are 59.94 Hz (NTSC), 50 Hz (PAL),
- and 48 Hz (film). Of course, a display that syncs to those refresh rates is
- required. The Apple Multiscan 17" and 20" will NOT sync to 48 Hz.
-
- 3. (Added by dgp) Any application can control the display resolution by using
- Apple's new Display Manager: DMCheckDisplayMode and DMSetDisplayMode. You may
- also want to use GDVideo.c:GDGetDisplayMode to record what the resolution was
- before you change it, so you can restore it when you're done. Try the TimeVideo
- demo, asking it to test all the resolutions.
-
- 4. (Added by dgp) Denis asks, "The 640x480x120 Hz mode on my Apple 17" multiscan
- is great. Rock solid. But the image isn't centered; about 10 pixels worth fall
- off the left edge of the screen. Can this be fixed?" Fernando replies, "Can you
- just adjust the controls on the monitor to move the image to the right? This
- would be the easiest solution and is what I had to do. The better solution
- (requiring a new version of the driver) is to adjust the horizontal parameters so
- that the display puts it close to the middle, but that'll take some doing."
-
- The "7500/8500 Graphics Driver" file should be placed in the extensions folder.
-
- Please do not give it wide distribution before you test it some. I have, but you
- never know. After that, it will, of course, NOT be supported by Apple. I will
- support it as long as time permits.
-
- - Fernando
-
- p.s. Fernando also documented a pair of private status and control video driver
- calls for the 7500/8500 driver that can disable waiting for VBL's and control how
- long the driver waits for the CLUT to settle after writing each entry in the
- CLUT. Fernando's documentation of the calls appears next to my implementation of
- access routines, GDSetDelay and GDGetDelay, in GDVideo.c. Documentation of how to
- use GDSetDelay and GDGetDelay appears at the top of GDVideo.c. (I've pasted a
- copy below.) Try running the TimeVideo demo. It allows you to enter any values
- you like, and they persist until reboot.
-
- OSErr GDSetDelay(GDHandle device,Boolean dontWaitForVBL,double nanoseconds);
- OSErr GDGetDelay(GDHandle device,Boolean *dontWaitForVBLPtr,double *nanosecondsPtr);
- These two routines (in VideoToolbox:GDVideo.c) support features, i.e.
- cscSetTimeDelays and cscGetTimeDelays, unique to the built-in video driver of the
- PowerMac 7500 and 8500. Both routines will merely return innocuous errors (-17
- and -18) if used with any other video driver. Like most video drivers, the
- 7500/8500 video driver normally waits for VBL when loading the CLUT, but this can
- be overriden by the Boolean parameter dontWaitForVBL, in which case, from then on
- (until it's changed again or the machine is rebooted) the driver will load the
- CLUT immediately when it's called, without waiting for VBL. The second feature is
- that the video driver normally waits 800 ns after loading each RGB triplet to the
- CLUT, "to allow for the CLUT to settle and increment its address", and that time
- can be set by the parameter "nanoseconds". GDGetDelay() allows you to read the
- current setting of both parameters. GDSetDelay() allows you to set both
- parameters. If the supplied value of "nanoseconds" is infinite or NAN then it's
- ignored and only "dontWaitForVBL" is set. The 7500/8500 video driver was written
- by Apple Engineer Fernando Urbina, nano@apple.com. GDSetDelay() and GDSetDelay()
- were written by Denis Pelli, to allow convenient access to Fernando's custom
- control and status driver calls. Note that Fernando Urbina has also supplied a
- newer version of this driver (included in the VideoToolbox) that supports several
- extra resolutions, of which the most noteworthy is 640x480x120 Hz, which works
- well on the Apple 17" Multiscan.
-
- Thus far, using visual inspection in TimeVideo, I've been unable to notice any
- bad effects of not waiting for VBL and reducing the waiting interval from 800 ns
- to zero. I asked Fernando Urbina, nano@apple.com, about it, since he put in the
- delays because he "does indeed get artifacts when updating the CLUT if we don't
- suppress interrupts while updating it." What were the artifacts? Fernando
- replies, "The delays are there because of hardware requirements: When writing to
- the CLUT in a self-incrementing mode the hardware requires 800ns to update the
- address counter. Of course, this is worst case. ( We write the CLUT starting
- address and then the R, G, and B. At the end of the B, the address counter for
- the CLUT will automatically increment to the next address.) I noticed some
- artifacts when doing palette animation -- one of the After Dark modules showed
- this very well."
-
- Received: 10/24
- From: Fernando Urbina, nano@apple.com
- To: Denis Pelli, denis@cns.nyu.edu
-
- The following is the information on the private call for the 7500 and the
- 8500 to disable waiting for VBL's and to change the time that we wait for
- the CLUT to settle after writing each entry in the CLUT. As shipped, the
- driver waits for 800 nanoseconds after writing each RGB triplet, to allow
- the hardware to increment the CLUT address.
-
- cscSetTimeDelays is used to set some flags and time delays used to write the
- CLUT. Use PBControl to issue the call, with the csParam[0] containing a pointer
- to a VDTimeDelay structure. Set the "validMask" field with the bits
- indicating which parameters you want to set.
-
- cscGetTimeDelays is used to examine the current values of the flags and time
- delays. Use PBStatus instead of PBControl. Set the "validMask" field
- with the bits indicating which parameters you want to get.
-
- The following is the definition of the fields of the VDTimeDelay struct:
-
- flags, bit 0: DontWaitForVBL flag: When false, it means that the driver should
- wait for a VBL before writing the CLUT. When true, the driver should NOT wait
- for a VBL.
-
- flags, bit 1: SetCLUTAddrRegTiming flag: When false, use the default timing.
- When true, use paramOne and paramTwo to specify the delay in nanoseconds.
-
- validMask: Specifies which bits in flags are valid. Bits are valid when
- corresponding bit position is 1.
-
- paramOne,paramTwo: When the SetCLUTAddrRegTiming bit of the validMask is set,
- then these fields specify the delay, in nanoseconds: nanoseconds.hi in paramOne
- and nanoseconds.lo in paramTwo. See Designing PCI Cards & Drivers for the
- Nanoseconds data structure.
-
- enum{cscSetTimeDelays = 141}; // Used to set the different time delays
- enum{cscGetTimeDelays = 141};
- enum{gDontWaitForVBLMask=1,gSetCLUTTimingMask=2};
- #if PRAGMA_ALIGN_SUPPORTED || __MWERKS__
- #pragma options align=mac68k
- #endif
- struct VDTimeDelays{
- UInt32 flags;
- UInt32 validMask;
- UInt32 paramOne;
- UInt32 paramTwo;
- };
- typedef struct VDTimeDelays VDTimeDelays;
- #if PRAGMA_ALIGN_SUPPORTED || __MWERKS__
- #pragma options align=reset
- #endif
-